package com.example.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.model.Book;
import com.example.demo.model.User;
import com.example.demo.model.UserBook;
import com.example.demo.vo.PageVo;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

public interface AdminService  {
    // 原代码保持不变...
// 创建


    // 新增方法
    Page<UserBook> getAllBorrowRecords(int page, int size);
    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;


    Book addBook(Book book);

    Book updateBook(Book book);

    Book getBookById(Long bookId);

    PageVo<Book> getAllBooks(int page, int size);

    PageVo<Book> searchBooks(Long bookId, String title, String author, int pageNumber, int pageSize);

    PageVo<UserBook> page(Long recordId, String title, User borrower, int pageNumber, int pageSize);

    String deleteBook(Long bookId);

    // 改进分页查询：添加查询条件

}
